// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Google Service Control API Version v1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://cloud.google.com/service-control/'>Google Service Control API</a>
 *      <tr><th>API Version<td>v1
 *      <tr><th>API Rev<td>20170313 (802)
 *      <tr><th>API Docs
 *          <td><a href='https://cloud.google.com/service-control/'>
 *              https://cloud.google.com/service-control/</a>
 *      <tr><th>Discovery Name<td>servicecontrol
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Google Service Control API can be found at
 * <a href='https://cloud.google.com/service-control/'>https://cloud.google.com/service-control/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.ServiceControl.v1
{
    /// <summary>The ServiceControl Service.</summary>
    public class ServiceControlService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public ServiceControlService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public ServiceControlService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            services = new ServicesResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "servicecontrol"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://servicecontrol.googleapis.com/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return ""; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Google Service Control API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

            /// <summary>Manage your Google Service Control data</summary>
            public static string Servicecontrol = "https://www.googleapis.com/auth/servicecontrol";

        }



        private readonly ServicesResource services;

        /// <summary>Gets the Services resource.</summary>
        public virtual ServicesResource Services
        {
            get { return services; }
        }
    }

    ///<summary>A base abstract class for ServiceControl requests.</summary>
    public abstract class ServiceControlBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new ServiceControlBaseServiceRequest instance.</summary>
        protected ServiceControlBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>V1 error format.</summary>
        [Google.Apis.Util.RequestParameterAttribute("$.xgafv", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<XgafvEnum> Xgafv { get; set; }

        /// <summary>V1 error format.</summary>
        public enum XgafvEnum
        {
            /// <summary>v1 error format</summary>
            [Google.Apis.Util.StringValueAttribute("1")]
            Value1,
            /// <summary>v2 error format</summary>
            [Google.Apis.Util.StringValueAttribute("2")]
            Value2,
        }

        /// <summary>OAuth access token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("access_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string AccessToken { get; set; }

        /// <summary>Data format for response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
            /// <summary>Media download with context-dependent Content-Type</summary>
            [Google.Apis.Util.StringValueAttribute("media")]
            Media,
            /// <summary>Responses with Content-Type of application/x-protobuf</summary>
            [Google.Apis.Util.StringValueAttribute("proto")]
            Proto,
        }

        /// <summary>OAuth bearer token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("bearer_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string BearerToken { get; set; }

        /// <summary>JSONP</summary>
        [Google.Apis.Util.RequestParameterAttribute("callback", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Callback { get; set; }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Pretty-print response.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("pp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> Pp { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>Legacy upload protocol for media (e.g. "media", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("uploadType", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadType { get; set; }

        /// <summary>Upload protocol for media (e.g. "raw", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("upload_protocol", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadProtocol { get; set; }

        /// <summary>Initializes ServiceControl parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "$.xgafv", new Google.Apis.Discovery.Parameter
                {
                    Name = "$.xgafv",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "access_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "access_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "bearer_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "bearer_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "callback", new Google.Apis.Discovery.Parameter
                {
                    Name = "callback",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "pp", new Google.Apis.Discovery.Parameter
                {
                    Name = "pp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "uploadType", new Google.Apis.Discovery.Parameter
                {
                    Name = "uploadType",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "upload_protocol", new Google.Apis.Discovery.Parameter
                {
                    Name = "upload_protocol",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "services" collection of methods.</summary>
    public class ServicesResource
    {
        private const string Resource = "services";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ServicesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Attempts to allocate quota for the specified consumer. It should be called before the operation is
        /// executed.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).
        ///
        /// **NOTE:** the client code **must** fail-open if the server returns one of the following quota errors: -
        /// `PROJECT_STATUS_UNVAILABLE` -   `SERVICE_STATUS_UNAVAILABLE` -   `BILLING_STATUS_UNAVAILABLE` -
        /// `QUOTA_SYSTEM_UNAVAILABLE`
        ///
        /// The server may inject above errors to prohibit any hard dependency on the quota system.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="serviceName">Name of the service as specified in the service configuration. For example,
        /// `"pubsub.googleapis.com"`.
        ///
        /// See google.api.Service for the definition of a service name.</param>
        public virtual AllocateQuotaRequest AllocateQuota(Google.Apis.ServiceControl.v1.Data.AllocateQuotaRequest body, string serviceName)
        {
            return new AllocateQuotaRequest(service, body, serviceName);
        }

        /// <summary>Attempts to allocate quota for the specified consumer. It should be called before the operation is
        /// executed.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).
        ///
        /// **NOTE:** the client code **must** fail-open if the server returns one of the following quota errors: -
        /// `PROJECT_STATUS_UNVAILABLE` -   `SERVICE_STATUS_UNAVAILABLE` -   `BILLING_STATUS_UNAVAILABLE` -
        /// `QUOTA_SYSTEM_UNAVAILABLE`
        ///
        /// The server may inject above errors to prohibit any hard dependency on the quota system.</summary>
        public class AllocateQuotaRequest : ServiceControlBaseServiceRequest<Google.Apis.ServiceControl.v1.Data.AllocateQuotaResponse>
        {
            /// <summary>Constructs a new AllocateQuota request.</summary>
            public AllocateQuotaRequest(Google.Apis.Services.IClientService service, Google.Apis.ServiceControl.v1.Data.AllocateQuotaRequest body, string serviceName)
                : base(service)
            {
                ServiceName = serviceName;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of the service as specified in the service configuration. For example,
            /// `"pubsub.googleapis.com"`.
            ///
            /// See google.api.Service for the definition of a service name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("serviceName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ServiceName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ServiceControl.v1.Data.AllocateQuotaRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "allocateQuota"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1/services/{serviceName}:allocateQuota"; }
            }

            /// <summary>Initializes AllocateQuota parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "serviceName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "serviceName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Checks an operation with Google Service Control to decide whether the given operation should
        /// proceed. It should be called before the operation is executed.
        ///
        /// If feasible, the client should cache the check results and reuse them for 60 seconds. In case of server
        /// errors, the client can rely on the cached results for longer time.
        ///
        /// NOTE: the `CheckRequest` has the size limit of 64KB.
        ///
        /// This method requires the `servicemanagement.services.check` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="serviceName">The service name as specified in its service configuration. For example,
        /// `"pubsub.googleapis.com"`.
        ///
        /// See google.api.Service for the definition of a service name.</param>
        public virtual CheckRequest Check(Google.Apis.ServiceControl.v1.Data.CheckRequest body, string serviceName)
        {
            return new CheckRequest(service, body, serviceName);
        }

        /// <summary>Checks an operation with Google Service Control to decide whether the given operation should
        /// proceed. It should be called before the operation is executed.
        ///
        /// If feasible, the client should cache the check results and reuse them for 60 seconds. In case of server
        /// errors, the client can rely on the cached results for longer time.
        ///
        /// NOTE: the `CheckRequest` has the size limit of 64KB.
        ///
        /// This method requires the `servicemanagement.services.check` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        public class CheckRequest : ServiceControlBaseServiceRequest<Google.Apis.ServiceControl.v1.Data.CheckResponse>
        {
            /// <summary>Constructs a new Check request.</summary>
            public CheckRequest(Google.Apis.Services.IClientService service, Google.Apis.ServiceControl.v1.Data.CheckRequest body, string serviceName)
                : base(service)
            {
                ServiceName = serviceName;
                Body = body;
                InitParameters();
            }


            /// <summary>The service name as specified in its service configuration. For example,
            /// `"pubsub.googleapis.com"`.
            ///
            /// See google.api.Service for the definition of a service name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("serviceName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ServiceName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ServiceControl.v1.Data.CheckRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "check"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1/services/{serviceName}:check"; }
            }

            /// <summary>Initializes Check parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "serviceName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "serviceName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Signals the quota controller that service ends the ongoing usage reconciliation.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="serviceName">Name of the service as specified in the service configuration. For example,
        /// `"pubsub.googleapis.com"`.
        ///
        /// See google.api.Service for the definition of a service name.</param>
        public virtual EndReconciliationRequest EndReconciliation(Google.Apis.ServiceControl.v1.Data.EndReconciliationRequest body, string serviceName)
        {
            return new EndReconciliationRequest(service, body, serviceName);
        }

        /// <summary>Signals the quota controller that service ends the ongoing usage reconciliation.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        public class EndReconciliationRequest : ServiceControlBaseServiceRequest<Google.Apis.ServiceControl.v1.Data.EndReconciliationResponse>
        {
            /// <summary>Constructs a new EndReconciliation request.</summary>
            public EndReconciliationRequest(Google.Apis.Services.IClientService service, Google.Apis.ServiceControl.v1.Data.EndReconciliationRequest body, string serviceName)
                : base(service)
            {
                ServiceName = serviceName;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of the service as specified in the service configuration. For example,
            /// `"pubsub.googleapis.com"`.
            ///
            /// See google.api.Service for the definition of a service name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("serviceName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ServiceName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ServiceControl.v1.Data.EndReconciliationRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "endReconciliation"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1/services/{serviceName}:endReconciliation"; }
            }

            /// <summary>Initializes EndReconciliation parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "serviceName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "serviceName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Releases previously allocated quota done through AllocateQuota method.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).
        ///
        /// **NOTE:** the client code **must** fail-open if the server returns one of the following quota errors: -
        /// `PROJECT_STATUS_UNVAILABLE` -   `SERVICE_STATUS_UNAVAILABLE` -   `BILLING_STATUS_UNAVAILABLE` -
        /// `QUOTA_SYSTEM_UNAVAILABLE`
        ///
        /// The server may inject above errors to prohibit any hard dependency on the quota system.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="serviceName">Name of the service as specified in the service configuration. For example,
        /// `"pubsub.googleapis.com"`.
        ///
        /// See google.api.Service for the definition of a service name.</param>
        public virtual ReleaseQuotaRequest ReleaseQuota(Google.Apis.ServiceControl.v1.Data.ReleaseQuotaRequest body, string serviceName)
        {
            return new ReleaseQuotaRequest(service, body, serviceName);
        }

        /// <summary>Releases previously allocated quota done through AllocateQuota method.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).
        ///
        /// **NOTE:** the client code **must** fail-open if the server returns one of the following quota errors: -
        /// `PROJECT_STATUS_UNVAILABLE` -   `SERVICE_STATUS_UNAVAILABLE` -   `BILLING_STATUS_UNAVAILABLE` -
        /// `QUOTA_SYSTEM_UNAVAILABLE`
        ///
        /// The server may inject above errors to prohibit any hard dependency on the quota system.</summary>
        public class ReleaseQuotaRequest : ServiceControlBaseServiceRequest<Google.Apis.ServiceControl.v1.Data.ReleaseQuotaResponse>
        {
            /// <summary>Constructs a new ReleaseQuota request.</summary>
            public ReleaseQuotaRequest(Google.Apis.Services.IClientService service, Google.Apis.ServiceControl.v1.Data.ReleaseQuotaRequest body, string serviceName)
                : base(service)
            {
                ServiceName = serviceName;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of the service as specified in the service configuration. For example,
            /// `"pubsub.googleapis.com"`.
            ///
            /// See google.api.Service for the definition of a service name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("serviceName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ServiceName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ServiceControl.v1.Data.ReleaseQuotaRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "releaseQuota"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1/services/{serviceName}:releaseQuota"; }
            }

            /// <summary>Initializes ReleaseQuota parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "serviceName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "serviceName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Reports operation results to Google Service Control, such as logs and metrics. It should be called
        /// after an operation is completed.
        ///
        /// If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting
        /// aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the
        /// aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons.
        ///
        /// NOTE: the `ReportRequest` has the size limit of 1MB.
        ///
        /// This method requires the `servicemanagement.services.report` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="serviceName">The service name as specified in its service configuration. For example,
        /// `"pubsub.googleapis.com"`.
        ///
        /// See google.api.Service for the definition of a service name.</param>
        public virtual ReportRequest Report(Google.Apis.ServiceControl.v1.Data.ReportRequest body, string serviceName)
        {
            return new ReportRequest(service, body, serviceName);
        }

        /// <summary>Reports operation results to Google Service Control, such as logs and metrics. It should be called
        /// after an operation is completed.
        ///
        /// If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting
        /// aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the
        /// aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons.
        ///
        /// NOTE: the `ReportRequest` has the size limit of 1MB.
        ///
        /// This method requires the `servicemanagement.services.report` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        public class ReportRequest : ServiceControlBaseServiceRequest<Google.Apis.ServiceControl.v1.Data.ReportResponse>
        {
            /// <summary>Constructs a new Report request.</summary>
            public ReportRequest(Google.Apis.Services.IClientService service, Google.Apis.ServiceControl.v1.Data.ReportRequest body, string serviceName)
                : base(service)
            {
                ServiceName = serviceName;
                Body = body;
                InitParameters();
            }


            /// <summary>The service name as specified in its service configuration. For example,
            /// `"pubsub.googleapis.com"`.
            ///
            /// See google.api.Service for the definition of a service name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("serviceName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ServiceName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ServiceControl.v1.Data.ReportRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "report"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1/services/{serviceName}:report"; }
            }

            /// <summary>Initializes Report parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "serviceName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "serviceName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Unlike rate quota, allocation quota does not get refilled periodically. So, it is possible that the
        /// quota usage as seen by the service differs from what the One Platform considers the usage is. This is
        /// expected to happen only rarely, but over time this can accumulate. Services can invoke StartReconciliation
        /// and EndReconciliation to correct this usage drift, as described below: 1. Service sends StartReconciliation
        /// with a timestamp in future for each metric that needs to be reconciled. The timestamp being in future allows
        /// to account for in-flight AllocateQuota and ReleaseQuota requests for the same metric. 2. One Platform
        /// records this timestamp and starts tracking subsequent AllocateQuota and ReleaseQuota requests until
        /// EndReconciliation is called. 3. At or after the time specified in the StartReconciliation, service sends
        /// EndReconciliation with the usage that needs to be reconciled to. 4. One Platform adjusts its own record of
        /// usage for that metric to the value specified in EndReconciliation by taking in to account any allocation or
        /// release between StartReconciliation and EndReconciliation.
        ///
        /// Signals the quota controller that the service wants to perform a usage reconciliation as specified in the
        /// request.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="serviceName">Name of the service as specified in the service configuration. For example,
        /// `"pubsub.googleapis.com"`.
        ///
        /// See google.api.Service for the definition of a service name.</param>
        public virtual StartReconciliationRequest StartReconciliation(Google.Apis.ServiceControl.v1.Data.StartReconciliationRequest body, string serviceName)
        {
            return new StartReconciliationRequest(service, body, serviceName);
        }

        /// <summary>Unlike rate quota, allocation quota does not get refilled periodically. So, it is possible that the
        /// quota usage as seen by the service differs from what the One Platform considers the usage is. This is
        /// expected to happen only rarely, but over time this can accumulate. Services can invoke StartReconciliation
        /// and EndReconciliation to correct this usage drift, as described below: 1. Service sends StartReconciliation
        /// with a timestamp in future for each metric that needs to be reconciled. The timestamp being in future allows
        /// to account for in-flight AllocateQuota and ReleaseQuota requests for the same metric. 2. One Platform
        /// records this timestamp and starts tracking subsequent AllocateQuota and ReleaseQuota requests until
        /// EndReconciliation is called. 3. At or after the time specified in the StartReconciliation, service sends
        /// EndReconciliation with the usage that needs to be reconciled to. 4. One Platform adjusts its own record of
        /// usage for that metric to the value specified in EndReconciliation by taking in to account any allocation or
        /// release between StartReconciliation and EndReconciliation.
        ///
        /// Signals the quota controller that the service wants to perform a usage reconciliation as specified in the
        /// request.
        ///
        /// This method requires the `servicemanagement.services.quota` permission on the specified service. For more
        /// information, see [Google Cloud IAM](https://cloud.google.com/iam).</summary>
        public class StartReconciliationRequest : ServiceControlBaseServiceRequest<Google.Apis.ServiceControl.v1.Data.StartReconciliationResponse>
        {
            /// <summary>Constructs a new StartReconciliation request.</summary>
            public StartReconciliationRequest(Google.Apis.Services.IClientService service, Google.Apis.ServiceControl.v1.Data.StartReconciliationRequest body, string serviceName)
                : base(service)
            {
                ServiceName = serviceName;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of the service as specified in the service configuration. For example,
            /// `"pubsub.googleapis.com"`.
            ///
            /// See google.api.Service for the definition of a service name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("serviceName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ServiceName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.ServiceControl.v1.Data.StartReconciliationRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "startReconciliation"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "v1/services/{serviceName}:startReconciliation"; }
            }

            /// <summary>Initializes StartReconciliation parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "serviceName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "serviceName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.ServiceControl.v1.Data
{    

    /// <summary>Request message for the AllocateQuota method.</summary>
    public class AllocateQuotaRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Operation that describes the quota allocation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allocateOperation")]
        public virtual QuotaOperation AllocateOperation { get; set; } 

        /// <summary>Allocation mode for this operation. Deprecated: use QuotaMode inside the QuotaOperation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allocationMode")]
        public virtual string AllocationMode { get; set; } 

        /// <summary>Specifies which version of service configuration should be used to process the request. If
        /// unspecified or no matching version can be found, the latest one will be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for the AllocateQuota method.</summary>
    public class AllocateQuotaResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Indicates the decision of the allocate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("allocateErrors")]
        public virtual System.Collections.Generic.IList<QuotaError> AllocateErrors { get; set; } 

        /// <summary>The same operation_id value used in the AllocateQuotaRequest. Used for logging and diagnostics
        /// purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Quota metrics to indicate the result of allocation. Depending on the request, one or more of the
        /// following metrics will be included:
        ///
        /// 1. For rate quota, per quota group or per quota metric incremental usage will be specified using the
        /// following delta metric: "serviceruntime.googleapis.com/api/consumer/quota_used_count"
        ///
        /// 2. For allocation quota, per quota metric total usage will be specified using the following gauge metric:
        /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
        ///
        /// 3. For both rate quota and allocation quota, the quota limit reached condition will be specified using the
        /// following boolean metric: "serviceruntime.googleapis.com/quota/exceeded"
        ///
        /// 4. For allocation quota, value for each quota limit associated with the metrics will be specified using the
        /// following gauge metric: "serviceruntime.googleapis.com/quota/limit"</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMetrics")]
        public virtual System.Collections.Generic.IList<MetricValueSet> QuotaMetrics { get; set; } 

        /// <summary>ID of the actual config used to process the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Common audit log format for Google Cloud Platform API operations.
    ///
    /// </summary>
    public class AuditLog : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Authentication information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("authenticationInfo")]
        public virtual AuthenticationInfo AuthenticationInfo { get; set; } 

        /// <summary>Authorization information. If there are multiple resources or permissions involved, then there is
        /// one AuthorizationInfo element for each {resource, permission} tuple.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("authorizationInfo")]
        public virtual System.Collections.Generic.IList<AuthorizationInfo> AuthorizationInfo { get; set; } 

        /// <summary>The name of the service method or operation. For API calls, this should be the name of the API
        /// method. For example,
        ///
        /// "google.datastore.v1.Datastore.RunQuery" "google.logging.v1.LoggingService.DeleteLog"</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("methodName")]
        public virtual string MethodName { get; set; } 

        /// <summary>The number of items returned from a List or Query API method, if applicable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numResponseItems")]
        public virtual System.Nullable<long> NumResponseItems { get; set; } 

        /// <summary>The operation request. This may not include all request parameters, such as those that are too
        /// large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated
        /// data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name
        /// will be indicated in the `@type` property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("request")]
        public virtual System.Collections.Generic.IDictionary<string,object> Request { get; set; } 

        /// <summary>Metadata about the operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestMetadata")]
        public virtual RequestMetadata RequestMetadata { get; set; } 

        /// <summary>The resource or collection that is the target of the operation. The name is a scheme-less URI, not
        /// including the API service name. For example:
        ///
        /// "shelves/SHELF_ID/books" "shelves/SHELF_ID/books/BOOK_ID"</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceName")]
        public virtual string ResourceName { get; set; } 

        /// <summary>The operation response. This may not include all response elements, such as those that are too
        /// large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated
        /// data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name
        /// will be indicated in the `@type` property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("response")]
        public virtual System.Collections.Generic.IDictionary<string,object> Response { get; set; } 

        /// <summary>Other service-specific data about the request, response, and other activities.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceData")]
        public virtual System.Collections.Generic.IDictionary<string,object> ServiceData { get; set; } 

        /// <summary>The name of the API service performing the operation. For example,
        /// `"datastore.googleapis.com"`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceName")]
        public virtual string ServiceName { get; set; } 

        /// <summary>The status of the overall operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual Status Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Authentication information for the operation.</summary>
    public class AuthenticationInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The authority selector specified by the requestor, if any. It is not guaranteed that the principal
        /// was allowed to use this authority.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("authoritySelector")]
        public virtual string AuthoritySelector { get; set; } 

        /// <summary>The email address of the authenticated user making the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("principalEmail")]
        public virtual string PrincipalEmail { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Authorization information for the operation.</summary>
    public class AuthorizationInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether or not authorization for `resource` and `permission` was granted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("granted")]
        public virtual System.Nullable<bool> Granted { get; set; } 

        /// <summary>The required IAM permission.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permission")]
        public virtual string Permission { get; set; } 

        /// <summary>The resource being accessed, as a REST-style string. For example:
        ///
        /// bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resource")]
        public virtual string Resource { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Defines the errors to be returned in google.api.servicecontrol.v1.CheckResponse.check_errors.</summary>
    public class CheckError : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The error code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>Free-form text providing details on the error cause of the error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("detail")]
        public virtual string Detail { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class CheckInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A list of fields and label keys that are ignored by the server. The client doesn't need to send
        /// them for following requests to improve performance and allow better aggregation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("unusedArguments")]
        public virtual System.Collections.Generic.IList<string> UnusedArguments { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for the Check method.</summary>
    public class CheckRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The operation to be checked.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operation")]
        public virtual Operation Operation { get; set; } 

        /// <summary>Requests the project settings to be returned as part of the check response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestProjectSettings")]
        public virtual System.Nullable<bool> RequestProjectSettings { get; set; } 

        /// <summary>Specifies which version of service configuration should be used to process the request.
        ///
        /// If unspecified or no matching version can be found, the latest one will be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>Indicates if service activation check should be skipped for this request. Default behavior is to
        /// perform the check and apply relevant quota.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("skipActivationCheck")]
        public virtual System.Nullable<bool> SkipActivationCheck { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for the Check method.</summary>
    public class CheckResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Indicate the decision of the check.
        ///
        /// If no check errors are present, the service should process the operation. Otherwise the service should use
        /// the list of errors to determine the appropriate action.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("checkErrors")]
        public virtual System.Collections.Generic.IList<CheckError> CheckErrors { get; set; } 

        /// <summary>Feedback data returned from the server during processing a Check request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("checkInfo")]
        public virtual CheckInfo CheckInfo { get; set; } 

        /// <summary>The same operation_id value used in the CheckRequest. Used for logging and diagnostics
        /// purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Quota information for the check request associated with this response. </summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaInfo")]
        public virtual QuotaInfo QuotaInfo { get; set; } 

        /// <summary>The actual config id used to process the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Distribution represents a frequency distribution of double-valued sample points. It contains the size
    /// of the population of sample points plus additional optional information:
    ///
    /// - the arithmetic mean of the samples - the minimum and maximum of the samples - the sum-squared-deviation of the
    /// samples, used to compute variance - a histogram of the values of the sample points</summary>
    public class Distribution : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The number of samples in each histogram bucket. `bucket_counts` are optional. If present, they must
        /// sum to the `count` value.
        ///
        /// The buckets are defined below in `bucket_option`. There are N buckets. `bucket_counts[0]` is the number of
        /// samples in the underflow bucket. `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples in
        /// each of the finite buckets. And `bucket_counts[N] is the number of samples in the overflow bucket. See the
        /// comments of `bucket_option` below for more details.
        ///
        /// Any suffix of trailing zeros may be omitted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bucketCounts")]
        public virtual System.Collections.Generic.IList<System.Nullable<long>> BucketCounts { get; set; } 

        /// <summary>The total number of samples in the distribution. Must be >= 0.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("count")]
        public virtual System.Nullable<long> Count { get; set; } 

        /// <summary>Buckets with arbitrary user-provided width.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("explicitBuckets")]
        public virtual ExplicitBuckets ExplicitBuckets { get; set; } 

        /// <summary>Buckets with exponentially growing width.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("exponentialBuckets")]
        public virtual ExponentialBuckets ExponentialBuckets { get; set; } 

        /// <summary>Buckets with constant width.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("linearBuckets")]
        public virtual LinearBuckets LinearBuckets { get; set; } 

        /// <summary>The maximum of the population of values. Ignored if `count` is zero.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maximum")]
        public virtual System.Nullable<double> Maximum { get; set; } 

        /// <summary>The arithmetic mean of the samples in the distribution. If `count` is zero then this field must be
        /// zero.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mean")]
        public virtual System.Nullable<double> Mean { get; set; } 

        /// <summary>The minimum of the population of values. Ignored if `count` is zero.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("minimum")]
        public virtual System.Nullable<double> Minimum { get; set; } 

        /// <summary>The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2) where each x_i is a
        /// sample values. If `count` is zero then this field must be zero, otherwise validation of the request
        /// fails.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sumOfSquaredDeviation")]
        public virtual System.Nullable<double> SumOfSquaredDeviation { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class EndReconciliationRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Operation that describes the quota reconciliation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reconciliationOperation")]
        public virtual QuotaOperation ReconciliationOperation { get; set; } 

        /// <summary>Specifies which version of service configuration should be used to process the request. If
        /// unspecified or no matching version can be found, the latest one will be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class EndReconciliationResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The same operation_id value used in the EndReconciliationRequest. Used for logging and diagnostics
        /// purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Metric values as tracked by One Platform before the adjustment was made. The following metrics will
        /// be included:
        ///
        /// 1. Per quota metric total usage will be specified using the following gauge metric:
        /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
        ///
        /// 2. Value for each quota limit associated with the metrics will be specified using the following gauge
        /// metric: "serviceruntime.googleapis.com/quota/limit"</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMetrics")]
        public virtual System.Collections.Generic.IList<MetricValueSet> QuotaMetrics { get; set; } 

        /// <summary>Indicates the decision of the reconciliation end.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reconciliationErrors")]
        public virtual System.Collections.Generic.IList<QuotaError> ReconciliationErrors { get; set; } 

        /// <summary>ID of the actual config used to process the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Describing buckets with arbitrary user-provided width.</summary>
    public class ExplicitBuckets : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>'bound' is a list of strictly increasing boundaries between buckets. Note that a list of length N-1
        /// defines N buckets because of fenceposting. See comments on `bucket_options` for details.
        ///
        /// The i'th finite bucket covers the interval [bound[i-1], bound[i]) where i ranges from 1 to bound_size() - 1.
        /// Note that there are no finite buckets at all if 'bound' only contains a single element; in that special case
        /// the single bound defines the boundary between the underflow and overflow buckets.
        ///
        /// bucket number                   lower bound    upper bound i == 0 (underflow)              -inf
        /// bound[i] 0 < i < bound_size()            bound[i-1]     bound[i] i == bound_size() (overflow)    bound[i-1]
        /// +inf</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bounds")]
        public virtual System.Collections.Generic.IList<System.Nullable<double>> Bounds { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Describing buckets with exponentially growing width.</summary>
    public class ExponentialBuckets : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale *
        /// growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be larger than 1.0.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("growthFactor")]
        public virtual System.Nullable<double> GrowthFactor { get; set; } 

        /// <summary>The number of finite buckets. With the underflow and overflow buckets, the total number of buckets
        /// is `num_finite_buckets` + 2. See comments on `bucket_options` for details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numFiniteBuckets")]
        public virtual System.Nullable<int> NumFiniteBuckets { get; set; } 

        /// <summary>The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale *
        /// growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be > 0.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("scale")]
        public virtual System.Nullable<double> Scale { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Describing buckets with constant width.</summary>
    public class LinearBuckets : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The number of finite buckets. With the underflow and overflow buckets, the total number of buckets
        /// is `num_finite_buckets` + 2. See comments on `bucket_options` for details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numFiniteBuckets")]
        public virtual System.Nullable<int> NumFiniteBuckets { get; set; } 

        /// <summary>The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i
        /// ranges from 1 to num_finite_buckets, inclusive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("offset")]
        public virtual System.Nullable<double> Offset { get; set; } 

        /// <summary>The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i
        /// ranges from 1 to num_finite_buckets, inclusive. Must be strictly positive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("width")]
        public virtual System.Nullable<double> Width { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An individual log entry.</summary>
    public class LogEntry : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A unique ID for the log entry used for deduplication. If omitted, the implementation will generate
        /// one based on operation_id.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("insertId")]
        public virtual string InsertId { get; set; } 

        /// <summary>A set of user-defined (key, value) data that provides additional information about the log
        /// entry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>Required. The log to which this log entry belongs. Examples: `"syslog"`, `"book_log"`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The log entry payload, represented as a protocol buffer that is expressed as a JSON object. You can
        /// only pass `protoPayload` values that belong to a set of approved types.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("protoPayload")]
        public virtual System.Collections.Generic.IDictionary<string,object> ProtoPayload { get; set; } 

        /// <summary>The severity of the log entry. The default value is `LogSeverity.DEFAULT`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("severity")]
        public virtual string Severity { get; set; } 

        /// <summary>The log entry payload, represented as a structure that is expressed as a JSON object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("structPayload")]
        public virtual System.Collections.Generic.IDictionary<string,object> StructPayload { get; set; } 

        /// <summary>The log entry payload, represented as a Unicode string (UTF-8).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("textPayload")]
        public virtual string TextPayload { get; set; } 

        /// <summary>The time the event described by the log entry occurred. If omitted, defaults to operation start
        /// time.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timestamp")]
        public virtual object Timestamp { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a single metric value.</summary>
    public class MetricValue : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A boolean value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("boolValue")]
        public virtual System.Nullable<bool> BoolValue { get; set; } 

        /// <summary>A distribution value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("distributionValue")]
        public virtual Distribution DistributionValue { get; set; } 

        /// <summary>A double precision floating point value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("doubleValue")]
        public virtual System.Nullable<double> DoubleValue { get; set; } 

        /// <summary>The end of the time period over which this metric value's measurement applies.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("endTime")]
        public virtual object EndTime { get; set; } 

        /// <summary>A signed 64-bit integer value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("int64Value")]
        public virtual System.Nullable<long> Int64Value { get; set; } 

        /// <summary>The labels describing the metric value. See comments on
        /// google.api.servicecontrol.v1.Operation.labels for the overriding relationship.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>A money value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("moneyValue")]
        public virtual Money MoneyValue { get; set; } 

        /// <summary>The start of the time period over which this metric value's measurement applies. The time period
        /// has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition
        /// documentation in the service configuration for details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startTime")]
        public virtual object StartTime { get; set; } 

        /// <summary>A text string value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("stringValue")]
        public virtual string StringValue { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a set of metric values in the same metric. Each metric value in the set should have a unique
    /// combination of start time, end time, and label values.</summary>
    public class MetricValueSet : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The metric name defined in the service configuration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metricName")]
        public virtual string MetricName { get; set; } 

        /// <summary>The values in this metric.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metricValues")]
        public virtual System.Collections.Generic.IList<MetricValue> MetricValues { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents an amount of money with its currency type.</summary>
    public class Money : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The 3-letter currency code defined in ISO 4217.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("currencyCode")]
        public virtual string CurrencyCode { get; set; } 

        /// <summary>Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999
        /// inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be
        /// positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is
        /// represented as `units`=-1 and `nanos`=-750,000,000.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nanos")]
        public virtual System.Nullable<int> Nanos { get; set; } 

        /// <summary>The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US
        /// dollar.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("units")]
        public virtual System.Nullable<long> Units { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents information regarding an operation.</summary>
    public class Operation : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identity of the consumer who is using the service. This field should be filled in for the
        /// operations initiated by a consumer, but not for service-initiated operations that are not related to a
        /// specific consumer.
        ///
        /// This can be in one of the following formats: project:, project_number:, api_key:.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("consumerId")]
        public virtual string ConsumerId { get; set; } 

        /// <summary>End time of the operation. Required when the operation is used in ServiceController.Report, but
        /// optional when the operation is used in ServiceController.Check.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("endTime")]
        public virtual object EndTime { get; set; } 

        /// <summary>DO NOT USE. This is an experimental field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("importance")]
        public virtual string Importance { get; set; } 

        /// <summary>Labels describing the operation. Only the following labels are allowed:
        ///
        /// - Labels describing monitored resources as defined in the service configuration. - Default labels of metric
        /// values. When specified, labels defined in the metric value override these default. - The following labels
        /// defined by Google Cloud Platform: - `cloud.googleapis.com/location` describing the location where the
        /// operation happened, - `servicecontrol.googleapis.com/user_agent` describing the user agent of the API
        /// request, - `servicecontrol.googleapis.com/service_agent` describing the service used to handle the API
        /// request (e.g. ESP), - `servicecontrol.googleapis.com/platform` describing the platform where the API is
        /// served (e.g. GAE, GCE, GKE).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>Represents information to be logged.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("logEntries")]
        public virtual System.Collections.Generic.IList<LogEntry> LogEntries { get; set; } 

        /// <summary>Represents information about this operation. Each MetricValueSet corresponds to a metric defined in
        /// the service configuration. The data type used in the MetricValueSet must agree with the data type specified
        /// in the metric definition.
        ///
        /// Within a single operation, it is not allowed to have more than one MetricValue instances that have the same
        /// metric names and identical label value combinations. If a request has such duplicated MetricValue instances,
        /// the entire request is rejected with an invalid argument error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metricValueSets")]
        public virtual System.Collections.Generic.IList<MetricValueSet> MetricValueSets { get; set; } 

        /// <summary>Identity of the operation. This must be unique within the scope of the service that generated the
        /// operation. If the service calls Check() and Report() on the same operation, the two calls should carry the
        /// same id.
        ///
        /// UUID version 4 is recommended, though not required. In scenarios where an operation is computed from
        /// existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is
        /// recommended. See RFC 4122 for details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Fully qualified name of the operation. Reserved for future use.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationName")]
        public virtual string OperationName { get; set; } 

        /// <summary>Represents the properties needed for quota check. Applicable only if this operation is for a quota
        /// check request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaProperties")]
        public virtual QuotaProperties QuotaProperties { get; set; } 

        /// <summary>The resource name of the parent of a resource in the resource hierarchy.
        ///
        /// This can be in one of the following formats: - “projects/” - “folders/” - “organizations/”</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceContainer")]
        public virtual string ResourceContainer { get; set; } 

        /// <summary>Required. Start time of the operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startTime")]
        public virtual object StartTime { get; set; } 

        /// <summary>User defined labels for the resource that this operation is associated with.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userLabels")]
        public virtual System.Collections.Generic.IDictionary<string,string> UserLabels { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class QuotaError : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Error code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>Free-form text that provides details on the cause of the error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>Subject to whom this error applies. See the specific enum for more details on this field. For
        /// example, "clientip:" or "project:".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("subject")]
        public virtual string Subject { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Contains the quota information for a quota check response.</summary>
    public class QuotaInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Quota Metrics that have exceeded quota limits. For QuotaGroup-based quota, this is QuotaGroup.name
        /// For QuotaLimit-based quota, this is QuotaLimit.name See: google.api.Quota Deprecated: Use quota_metrics to
        /// get per quota group limit exceeded status.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("limitExceeded")]
        public virtual System.Collections.Generic.IList<string> LimitExceeded { get; set; } 

        /// <summary>Map of quota group name to the actual number of tokens consumed. If the quota check was not
        /// successful, then this will not be populated due to no quota consumption. Deprecated: Use quota_metrics to
        /// get per quota group usage.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaConsumed")]
        public virtual System.Collections.Generic.IDictionary<string,System.Nullable<int>> QuotaConsumed { get; set; } 

        /// <summary>Quota metrics to indicate the usage. Depending on the check request, one or more of the following
        /// metrics will be included:
        ///
        /// 1. For rate quota, per quota group or per quota metric incremental usage will be specified using the
        /// following delta metric: "serviceruntime.googleapis.com/api/consumer/quota_used_count"
        ///
        /// 2. For allocation quota, per quota metric total usage will be specified using the following gauge metric:
        /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
        ///
        /// 3. For both rate quota and allocation quota, the quota limit reached condition will be specified using the
        /// following boolean metric: "serviceruntime.googleapis.com/quota/exceeded"</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMetrics")]
        public virtual System.Collections.Generic.IList<MetricValueSet> QuotaMetrics { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents information regarding a quota operation.</summary>
    public class QuotaOperation : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identity of the consumer for whom this quota operation is being performed.
        ///
        /// This can be in one of the following formats: project:, project_number:, api_key:.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("consumerId")]
        public virtual string ConsumerId { get; set; } 

        /// <summary>Labels describing the operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>Fully qualified name of the API method for which this quota operation is requested. This name is
        /// used for matching quota rules or metric rules and billing status rules defined in service configuration.
        /// This field is not required if the quota operation is performed on non-API resources.
        ///
        /// Example of an RPC method name: google.example.library.v1.LibraryService.CreateShelf</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("methodName")]
        public virtual string MethodName { get; set; } 

        /// <summary>Identity of the operation. This must be unique within the scope of the service that generated the
        /// operation. If the service calls AllocateQuota and ReleaseQuota on the same operation, the two calls should
        /// carry the same ID.
        ///
        /// UUID version 4 is recommended, though not required. In scenarios where an operation is computed from
        /// existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is
        /// recommended. See RFC 4122 for details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Represents information about this operation. Each MetricValueSet corresponds to a metric defined in
        /// the service configuration. The data type used in the MetricValueSet must agree with the data type specified
        /// in the metric definition.
        ///
        /// Within a single operation, it is not allowed to have more than one MetricValue instances that have the same
        /// metric names and identical label value combinations. If a request has such duplicated MetricValue instances,
        /// the entire request is rejected with an invalid argument error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMetrics")]
        public virtual System.Collections.Generic.IList<MetricValueSet> QuotaMetrics { get; set; } 

        /// <summary>Quota mode for this operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMode")]
        public virtual string QuotaMode { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents the properties needed for quota operations.
    ///
    /// Use the metric_value_sets field in Operation message to provide cost override with metric_name in /quota//cost
    /// format. Overrides for unmatched quota groups will be ignored. Costs are expected to be >= 0. Cost 0 will cause
    /// no quota check, but still traffic restrictions will be enforced.</summary>
    public class QuotaProperties : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>LimitType IDs that should be used for checking quota. Key in this map should be a valid LimitType
        /// string, and the value is the ID to be used. For example, an entry  will cause all user quota limits to use
        /// 123 as the user ID. See google/api/quota.proto for the definition of LimitType. CLIENT_PROJECT: Not
        /// supported. USER: Value of this entry will be used for enforcing user-level quota limits. If none specified,
        /// caller IP passed in the servicecontrol.googleapis.com/caller_ip label will be used instead. If the server
        /// cannot resolve a value for this LimitType, an error will be thrown. No validation will be performed on this
        /// ID. Deprecated: use servicecontrol.googleapis.com/user label to send user ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("limitByIds")]
        public virtual System.Collections.Generic.IDictionary<string,string> LimitByIds { get; set; } 

        /// <summary>Quota mode for this operation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMode")]
        public virtual string QuotaMode { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for the ReleaseQuota method.</summary>
    public class ReleaseQuotaRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Operation that describes the quota release.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("releaseOperation")]
        public virtual QuotaOperation ReleaseOperation { get; set; } 

        /// <summary>Specifies which version of service configuration should be used to process the request. If
        /// unspecified or no matching version can be found, the latest one will be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for the ReleaseQuota method.</summary>
    public class ReleaseQuotaResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The same operation_id value used in the ReleaseQuotaRequest. Used for logging and diagnostics
        /// purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Quota metrics to indicate the result of release. Depending on the request, one or more of the
        /// following metrics will be included:
        ///
        /// 1. For rate quota, per quota group or per quota metric released amount will be specified using the following
        /// delta metric: "serviceruntime.googleapis.com/api/consumer/quota_refund_count"
        ///
        /// 2. For allocation quota, per quota metric total usage will be specified using the following gauge metric:
        /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
        ///
        /// 3. For allocation quota, value for each quota limit associated with the metrics will be specified using the
        /// following gauge metric: "serviceruntime.googleapis.com/quota/limit"</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMetrics")]
        public virtual System.Collections.Generic.IList<MetricValueSet> QuotaMetrics { get; set; } 

        /// <summary>Indicates the decision of the release.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("releaseErrors")]
        public virtual System.Collections.Generic.IList<QuotaError> ReleaseErrors { get; set; } 

        /// <summary>ID of the actual config used to process the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents the processing error of one `Operation` in the request.</summary>
    public class ReportError : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The Operation.operation_id value from the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Details of the error when processing the `Operation`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual Status Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ReportInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The Operation.operation_id value from the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Quota usage info when processing the `Operation`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaInfo")]
        public virtual QuotaInfo QuotaInfo { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for the Report method.</summary>
    public class ReportRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Operations to be reported.
        ///
        /// Typically the service should report one operation per request. Putting multiple operations into a single
        /// request is allowed, but should be used only when multiple operations are natually available at the time of
        /// the report.
        ///
        /// If multiple operations are in a single request, the total request size should be no larger than 1MB. See
        /// ReportResponse.report_errors for partial failure behavior.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operations")]
        public virtual System.Collections.Generic.IList<Operation> Operations { get; set; } 

        /// <summary>Specifies which version of service config should be used to process the request.
        ///
        /// If unspecified or no matching version can be found, the latest one will be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for the Report method.</summary>
    public class ReportResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Partial failures, one for each `Operation` in the request that failed processing. There are three
        /// possible combinations of the RPC status:
        ///
        /// 1. The combination of a successful RPC status and an empty `report_errors` list indicates a complete success
        /// where all `Operations` in the request are processed successfully. 2. The combination of a successful RPC
        /// status and a non-empty `report_errors` list indicates a partial success where some `Operations` in the
        /// request succeeded. Each `Operation` that failed processing has a corresponding item in this list. 3. A
        /// failed RPC status indicates a general non-deterministic failure. When this happens, it's impossible to know
        /// which of the 'Operations' in the request succeeded or failed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportErrors")]
        public virtual System.Collections.Generic.IList<ReportError> ReportErrors { get; set; } 

        /// <summary>Quota usage for each quota release `Operation` request.
        ///
        /// Fully or partially failed quota release request may or may not be present in `report_quota_info`. For
        /// example, a failed quota release request will have the current quota usage info when precise quota library
        /// returns the info. A deadline exceeded quota request will not have quota usage info.
        ///
        /// If there is no quota release request, report_quota_info will be empty. </summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reportInfos")]
        public virtual System.Collections.Generic.IList<ReportInfo> ReportInfos { get; set; } 

        /// <summary>The actual config id used to process the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Metadata about the request.</summary>
    public class RequestMetadata : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The IP address of the caller.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("callerIp")]
        public virtual string CallerIp { get; set; } 

        /// <summary>The user agent of the caller. This information is not authenticated and should be treated
        /// accordingly. For example:
        ///
        /// +   `google-api-python-client/1.4.0`: The request was made by the Google API client for Python. +   `Cloud
        /// SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the Google Cloud SDK CLI
        /// (gcloud). +   `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`: The request was
        /// made from the `my-project` App Engine app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("callerSuppliedUserAgent")]
        public virtual string CallerSuppliedUserAgent { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class StartReconciliationRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Operation that describes the quota reconciliation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reconciliationOperation")]
        public virtual QuotaOperation ReconciliationOperation { get; set; } 

        /// <summary>Specifies which version of service configuration should be used to process the request. If
        /// unspecified or no matching version can be found, the latest one will be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class StartReconciliationResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The same operation_id value used in the StartReconciliationRequest. Used for logging and
        /// diagnostics purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("operationId")]
        public virtual string OperationId { get; set; } 

        /// <summary>Metric values as tracked by One Platform before the start of reconciliation. The following metrics
        /// will be included:
        ///
        /// 1. Per quota metric total usage will be specified using the following gauge metric:
        /// "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
        ///
        /// 2. Value for each quota limit associated with the metrics will be specified using the following gauge
        /// metric: "serviceruntime.googleapis.com/quota/limit"</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaMetrics")]
        public virtual System.Collections.Generic.IList<MetricValueSet> QuotaMetrics { get; set; } 

        /// <summary>Indicates the decision of the reconciliation start.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("reconciliationErrors")]
        public virtual System.Collections.Generic.IList<QuotaError> ReconciliationErrors { get; set; } 

        /// <summary>ID of the actual config used to process the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceConfigId")]
        public virtual string ServiceConfigId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The `Status` type defines a logical error model that is suitable for different programming
    /// environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model
    /// is designed to be:
    ///
    /// - Simple to use and understand for most users - Flexible enough to meet unexpected needs
    ///
    /// # Overview
    ///
    /// The `Status` message contains three pieces of data: error code, error message, and error details. The error code
    /// should be an enum value of google.rpc.Code, but it may accept additional error codes if needed.  The error
    /// message should be a developer-facing English message that helps developers *understand* and *resolve* the error.
    /// If a localized user-facing error message is needed, put the localized message in the error details or localize
    /// it in the client. The optional error details may contain arbitrary information about the error. There is a
    /// predefined set of error detail types in the package `google.rpc` which can be used for common error conditions.
    ///
    /// # Language mapping
    ///
    /// The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire
    /// format. When the `Status` message is exposed in different client libraries and different wire protocols, it can
    /// be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped
    /// to some error codes in C.
    ///
    /// # Other uses
    ///
    /// The error model and the `Status` message can be used in a variety of environments, either with or without APIs,
    /// to provide a consistent developer experience across different environments.
    ///
    /// Example uses of this error model include:
    ///
    /// - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the
    /// normal response to indicate the partial errors.
    ///
    /// - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error
    /// reporting purpose.
    ///
    /// - Batch operations. If a client uses batch request and batch response, the `Status` message should be used
    /// directly inside batch response, one for each error sub-response.
    ///
    /// - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of
    /// those operations should be represented directly using the `Status` message.
    ///
    /// - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any
    /// stripping needed for security/privacy reasons.</summary>
    public class Status : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The status code, which should be an enum value of google.rpc.Code.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual System.Nullable<int> Code { get; set; } 

        /// <summary>A list of messages that carry the error details.  There will be a common set of message types for
        /// APIs to use.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("details")]
        public virtual System.Collections.Generic.IList<System.Collections.Generic.IDictionary<string,object>> Details { get; set; } 

        /// <summary>A developer-facing error message, which should be in English. Any user-facing error message should
        /// be localized and sent in the google.rpc.Status.details field, or localized by the client.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("message")]
        public virtual string Message { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
